package com.kfm.am;

import java.util.Scanner;

public class Exec04 {

    public static void main(String[] args) {
        //将一个字符串逆序输出 例如: abcd --> dcba
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
        System.out.println(reverse(str));
    }

    public static String reverse(String str) {
        String[] split = str.split("");
        String newStr = "";
        for (int i = split.length - 1; i >= 0; i--) {
            newStr += split[i];
        }
        return newStr;
    }

    public static String reverse2(String str) {
        String newStr = "";
        for (int i = str.length() - 1; i >= 0; i--) {
            newStr += str.charAt(i);
        }
        return newStr;
    }

    public static String reverse3(String str) {
        char[] chars = str.toCharArray();
        String newStr = "";
        for (int i = chars.length - 1; i >= 0; i--) {
            newStr += chars[i];
        }
        return newStr;
    }
}
